﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/Site.Master" AutoEventWireup="true"
    CodeBehind="ProductList.aspx.cs" Inherits="LEARNREN.COM.WebSite.ProductList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHearder" runat="server">
    <title>
        <%=curentCatalogue.Title %>-<%=LEARNREN.COM.BLL.BasicCache.SiteConfig.SiteName%>-<%=LEARNREN.COM.BLL.BasicCache.SiteConfig.KeyWords%>
    </title>
    <meta name="keywords" content="<%=curentCatalogue.KeyWords%>" />
    <meta name="description" content="<%=curentCatalogue.Summary%>" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpLeftColum1" runat="server">
    <%if (childCatalogueList != null && childCatalogueList.Count() > 0)
      { %>
    <table class="bk" border="0" cellspacing="0" cellpadding="0" width="240" align="center">
        <tbody>
            <tr>
                <td height="270" valign="top">
                    <table border="0" cellspacing="0" cellpadding="0" width="240" align="center" height="27"
                        style="margin-bottom: 8px;">
                        <tbody>
                            <tr>
                                <td class="baicu12" background="/images/hdf/left01.jpg" width="90" align="middle">
                                    <%=curentCatalogue.Title%>
                                </td>
                                <td background="/images/hdf/left02.jpg" width="100">
                                    &nbsp;
                                </td>
                                <td background="/images/hdf/left02.jpg" width="50" align="middle">
                                    &nbsp;
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table border="0" cellspacing="0" cellpadding="0" width="220" align="center">
                        <%foreach (var childCatalogue in childCatalogueList)
                          {
                              
                        %>
                        <tr>
                            <td height="30" width="28" align="middle" class="foot_xx">
                                <img alt="" src="/images/hdf/pot.gif" width="10" height="9" />
                            </td>
                            <td width="192" class="foot_xx">
                                <a href="<%="/"+childCatalogue.CatalogueType.ToString()+".aspx?id="+childCatalogue.Id %>"
                                    class="cuhui12">
                                    <%=childCatalogue.Title%></a>
                            </td>
                        </tr>
                        <%} %>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <%}
      else
      { %>
    <table class="bk" border="0" cellspacing="0" cellpadding="0" width="240" align="center">
        <tbody>
            <tr>
                <td height="270" valign="top">
                    <table border="0" cellspacing="0" cellpadding="0" width="240" align="center" height="27"
                        style="margin-bottom: 8px;">
                        <tbody>
                            <tr>
                                <td class="baicu12" background="/images/hdf/left01.jpg" width="90" align="middle">
                                    产品分类
                                </td>
                                <td background="/images/hdf/left02.jpg" width="100">
                                    &nbsp;
                                </td>
                                <td background="/images/hdf/left02.jpg" width="50" align="middle">
                                    <a href="/ProductList.aspx?id=2">
                                        <img alt="所有产品" border="0" src="/images/hdf/more.gif" width="40" height="12" /></a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table border="0" cellspacing="0" cellpadding="0" width="220" align="center">
                        <%foreach (var productCatalogue in productCatalogueList)
                          {
                              
                        %>
                        <tr>
                            <td height="30" width="28" align="middle" class="foot_xx">
                                <img alt="" src="/images/hdf/pot.gif" width="10" height="9" />
                            </td>
                            <td width="192" class="foot_xx">
                                <a href="/ProductList.aspx?id=<%=productCatalogue.Id %>" class="cuhui12">
                                    <%=productCatalogue.Title%></a>
                            </td>
                        </tr>
                        <%} %>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <%} %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpLeftColum2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cpMain" runat="server">
    <table width="750" height="574" cellspacing="0" cellpadding="0" border="0" align="center"
        class="bk">
        <tbody>
            <tr>
                <td valign="top">
                    <table width="750" height="27" cellspacing="0" cellpadding="0" border="0" align="center">
                        <tbody>
                            <tr>
                                <td width="90" background="/images/hdf/left01.jpg" align="center" class="baicu12">
                                    <%=curentCatalogue.Title %>
                                </td>
                                <td width="470" background="/images/hdf/left02.jpg">
                                    &nbsp;
                                </td>
                                <td width="90" background="/images/hdf/left02.jpg" align="center">
                                    共有
                                    <%=productList.Count %>
                                    个产品
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table width="740" height="40" cellspacing="0" cellpadding="0" border="0" align="center">
                        <tbody>
                            <tr>
                                <td valign="top" height="40" style="line-height: 25px; padding-top: 15px;" class="news_info">
                                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                        <tbody>
                                            <tr>
                                                <td height="42" colspan="3">
                                                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                                        <tbody>
                                                            <tr>
                                                                <td width="100%" height="5" colspan="3">
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3">
                                                                    <table width="98%" cellspacing="1" cellpadding="0" border="0" align="center">
                                                                        <tbody>
                                                                            <%
                                                                                double rowcount = Math.Ceiling(productList.Count / 3.0);
                                                                                for (int i = 0; i < rowcount; i++)
                                                                                {                                                                                
                                                                            %>
                                                                            <tr>
                                                                                <%for (int j = 0; j < 3; j++)
                                                                                  {
                                                                                      int index = i * 3 + j;
                                                                                      if (index >= productList.Count)
                                                                                      {
                                                                                          break;
                                                                                      }
                                                                                      LEARNREN.COM.Entity.Product product = productList[index];                                                                                
                                                                                %>
                                                                                <td>
                                                                                    <table width="170" cellspacing="2" cellpadding="0" border="0" align="center">
                                                                                        <tbody>
                                                                                            <tr>
                                                                                                <td colspan="2">
                                                                                                    <table cellspacing="5" cellpadding="0" border="0">
                                                                                                        <tbody>
                                                                                                            <tr>
                                                                                                                <td align="center">
                                                                                                                    <table cellspacing="0" cellpadding="0" border="0" align="center">
                                                                                                                        <tbody>
                                                                                                                            <tr>
                                                                                                                                <td height="10">
                                                                                                                                    <img alt="" width="10" height="10" src="/images/hdf/bg_0ltop.gif">
                                                                                                                                </td>
                                                                                                                                <td height="10" background="/images/hdf/bg_01.gif">
                                                                                                                                </td>
                                                                                                                                <td height="10">
                                                                                                                                    <img  alt="" width="10" height="10" src="/images/hdf/bg_0rtop.gif">
                                                                                                                                </td>
                                                                                                                            </tr>
                                                                                                                            <tr>
                                                                                                                                <td width="10" background="/images/hdf/bg_03.gif">
                                                                                                                                    &nbsp;
                                                                                                                                </td>
                                                                                                                                <td>
                                                                                                                                    <div align="center">
                                                                                                                                        <a href="/ShowProduct.aspx?ID=<%=product.Id %>">
                                                                                                                                            <img alt="<%=product.ProductName%>" width="180" height="130" border="0" src="<%=product.ProductIco.TrimStart('~')%>"/></a>
                                                                                                                                    </div>
                                                                                                                                </td>
                                                                                                                                <td width="10" background="/images/hdf/bg_04.gif">
                                                                                                                                    &nbsp;
                                                                                                                                </td>
                                                                                                                            </tr>
                                                                                                                            <tr>
                                                                                                                                <td height="10">
                                                                                                                                    <img width="10" height="10" src="/images/hdf/bg_0lbottom.gif">
                                                                                                                                </td>
                                                                                                                                <td height="10" background="/images/hdf/bg_02.gif">
                                                                                                                                </td>
                                                                                                                                <td height="10">
                                                                                                                                    <img width="10" height="10" src="/images/hdf/bg_0rbottom.gif">
                                                                                                                                </td>
                                                                                                                            </tr>
                                                                                                                        </tbody>
                                                                                                                    </table>
                                                                                                                </td>
                                                                                                            </tr>
                                                                                                        </tbody>
                                                                                                    </table>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td align="right">
                                                                                                    名称:
                                                                                                </td>
                                                                                                <td width="80%">
                                                                                                    <a href="/ShowProduct.aspx?ID=<%=product.Id %>">
                                                                                                        <%=product.ProductName%></a>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td align="right">
                                                                                                    编号:
                                                                                                </td>
                                                                                                <td>
                                                                                                    <%=product.ProductCode %>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr>
                                                                                                <td colspan="2">
                                                                                                </td>
                                                                                            </tr>
                                                                                        </tbody>
                                                                                    </table>
                                                                                </td>
                                                                                <%} %>
                                                                            </tr>
                                                                            <%} %>
                                                                        </tbody>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
